package cm.zhentao.service.impl;

import cm.zhentao.pojo.dto.DeviceGatherDto;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cm.zhentao.pojo.TDeviceGather;
import cm.zhentao.service.TDeviceGatherService;
import cm.zhentao.mapper.TDeviceGatherMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
* @author Lenovo
* @description 针对表【t_device_gather】的数据库操作Service实现
* @createDate 2024-07-17 10:50:47
*/
@Service
public class TDeviceGatherServiceImpl extends ServiceImpl<TDeviceGatherMapper, TDeviceGather>
    implements TDeviceGatherService{
    @Resource
    private TDeviceGatherMapper deviceGatherMapper;
    /**
     * 采集数据列表可以分页展示所有的采集数据信息。
     * 同时添加一个设备类型的下拉菜单用来做条件筛选
     * @param dto
     * @return
     */
    @Override
    public Page<TDeviceGather> getGatherList(DeviceGatherDto dto) {
        Page<TDeviceGather> page = new Page<>(dto.getPageNum(),dto.getPageSize());
        Page<TDeviceGather> page1 = deviceGatherMapper.getGatherList(page,dto);
        return page1;
    }
}




